<script lang="ts" setup>
import {ref} from "vue";
const totalConut=ref(0)
const addCount=()=>{
  totalConut.value++
  console.log(totalConut);
}
const jianjian=()=>{
  totalConut.value--
  console.log(totalConut);
}
</script>

<template>
  <button @click="addCount">+</button>
  <span>{{ totalConut }}</span>
  <button @click="jianjian">-</button>
</template>

<style scoped></style>